<!DOCTYPE html>
<!-- saved from url=(0025)http://m.paixie.net/cart/ -->

<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>购物车</title>
		<meta name="keywords" content="">
		<meta name="description" content="">
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="edge">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="format-detection" content="telphone=no, email=no">
		<meta name="renderer" content="webkit">
		<meta name="HandheldFriendly" content="true">
		<meta name="MobileOptimized" content="320">
		<meta name="screen-orientation" content="portrait">
		<meta name="x5-orientation" content="portrait">
		<meta name="full-screen" content="yes">
		<meta name="x5-fullscreen" content="true">
		<meta name="browsermode" content="application">
		<meta name="x5-page-mode" content="app">
		<meta name="msapplication-tap-highlight" content="no">
		<meta content="initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
		<link rel="stylesheet" href="__CSS__/member/order.css" type="text/css">
		<script type="text/javascript" src="__JS__/zepto.min.js"></script>
		<script type="text/javascript">

			$(function(){
				if ($('.numbox').length > 0) $('.numbox').each(function (index, element) {
			        if (Number($(element).find('input').val()) > 1) $(element).find('.del').removeClass('noclick');
			    });
			    $('.numbox a').live('click', function () {
			        var $div = $(this).parent();
			        var did = $(this).attr('did');
			        var num = Number($div.find('input:eq(0)').val());
			        if ($(this).hasClass('del') && num == 1) {
			            Model.message('商品数量不能再减少了');
			        }
			        if ($(this).hasClass('noclick')) return false;
			        var bignum = $div.find('input:eq(0)').data('maxnum');
			        if ($(this).hasClass('del')) {
			        	num = num - 1 <= 1 ? 1 : num - 1;
			        } else if ($(this).hasClass('add')) {
			            num = num + 1 >= bignum ? bignum : num + 1;
			        }
			        $.get("{:U('update_num')}", {id: did, num: num}, function(r){
						if(r.status){
							$div.find('input').val(num);
						}	
					}, 'json');
			        
			        $div.find('a').removeClass('noclick');
			        $div.parents('li').find('.js-num').text(num);
			        if (num == 1) {
			            $div.find('a.del').addClass('noclick');
			        } else if (num == bignum) {
			            $div.find('a.add').addClass('noclick');
			        }
			        return false;
			    });

			    $('#js-delcar2').click(function () {
			        $('li .m_order_checkbox input').each(function (index, element) {
			            var self = $(this).parent();
			            if (self.hasClass("m_checked")) {
			                var id = $(element).parents('li').find('.numbox input').attr('brandid');
			                var item_id = $(element).parents('li').find('.numbox input').attr('itemid');
			                $(element).parents('li').remove();
			                $.ajax({
			                    url: "{:U('del_goods')}",
			                    type: 'POST',
			                    dataType: 'json',
			                    data: {
			                        id: id
			                    },
			                    cache: false,
			                    timeout: 50000,
			                    error: function (data) {}, success: function (data) {
			                        Model.alert("删除成功");
			                    }
			                });
			            }
			        });
			        $('.goodslist').each(function (index, element) {
			            if ($(element).find('li').length == 0) $(element).parent().remove();
			        });
			        if ($('.goodslist').length > 0) {
			            price();
			        } else {
			            $('#js-form').after('<div class="emptycart"><i></i><br/>购物车还是空的<p>去选几件中意的商品吧~</p><a href="/">看看有什么活动</a></div>');
			            $('#js-form,#js-delcart').remove();
			        }
			    });
			});
		</script>
	</head>

	<body>
		<div class="body">
			<div class="m_header">
				<p>
					<a class="bt_prev" href="javascript:window.history.back();void(0);">
						<span class="prev rotate45"></span>
						<span class="prev rotate135"></span>
					</a>
				</p>
				<h1 class="ellipsis bt_title">购物车</h1>
			</div>
			
			<div class="lib_content" id="js_lib_content">
				<!--购物车有商品-->
				<div class="car_opera">
					<label class="m_radio m_order_checkbox">
						<input class="js_select_all" type="checkbox">
					</label>
					<label for="select_all" class="gray6">全选</label>
					<i class="m_icon m_icon_delete_gray right" id="js-delcar2"></i>
				</div>
				<form id="js-form" action="{:U('Order/order_index')}" method="post">
					<!-------------------------------------- 供应商 start ------------------------------------------ -->
					<empty  name="list">
					<div class="emptycart"><i></i><br/>购物车还是空的<p>去选几件中意的商品吧~</p><a href="/">看看有什么活动</a></div>
					<else />
					<div class="goodsbox">
						<div class="shopname">
							<label class="m_radio m_order_checkbox">
								<input type="checkbox" name="">
							</label>
							科而士
						</div>
						<ul class="goodslist">
							
							<volist name="list" id="v">
								<li>
									<div class="img">
										<label class="m_radio m_order_checkbox">
											<input type="checkbox" itemid="957761219750" name="" value="{$v.id}">
											<input type="hidden" name="id[]" value="{$v.id}">
										</label>
										<div class="img_type">
											<img class="img180" src="{$v.picture||get_cover='path'}">
										</div>
									</div>
									<div class="info">
										<p class="title"><a class="name gray3" href="http://m.paixie.net/shoe-bideshjia-1212-957761.html">{$v.name}</a></p>
										<span class="gray">颜色：{$v.color}<br>尺码：{$v.size} 码</span>
										<p class="numbox">
											<a class="del noclick" did="{$v.id}" href="javascript:void(0)">-</a>
											<input class="num" type="text" name="business[30578][items][957761219750][num]" value="{$v.num}" brandid="{$v.id}" itemid="957761219750" data-maxnum="20">
											<a class="add" did="{$v.id}" href="javascript:void(0)">+</a>
											<i class="clear"></i>
										</p>
									</div>
									<div class="price">
										<input type="hidden" name="business[30578][items][957761219750][sizeid]" value="21975">
										<span class="oof">￥</span><span class="js-price">{$v.price}</span>
										<br>
										<del><span class="oof">￥</span>{$v.shop_price}</del>
										<br>
										<span class="f10">×</span><span class="js-num">{$v.num}</span>
									</div>
									<div class="clear"></div>
								</li>
							</volist>
							
						</ul>
						<div class="singletotal gray9">
							数量：<span class="js-stnum gray3">0</span>
							<br> 总金额：
							<span class="oof orange">￥<em class="js-stprice">0.00</em></span>
						</div>
					</div>
					</empty >
					<div class="placeholder"></div>
					<div class="placeholder"></div>
					<div class="fixed_price">
						<!--<div><i class="checkbox cok"><input type="checkbox" name=""></i>全选</div>-->
						<div class="price_info">
							<p class="total">
								<label class="m_radio m_order_checkbox">
									<input class="js_select_all" type="checkbox">
								</label>
								合计：<span class="orange">￥<em>0.00</em></span>
							</p>
						</div>
						<input class="submit" type="submit" value="结算(0)">
						<em class="clear"></em>
					</div>
				</form>
			</div>
			<include file="Public/m_footer" />
			<div class="placeholder"></div>
			<div class="placeholder"></div>
			<div class="placeholder"></div>
			<div class="placeholder"></div>
			<div class="placeholder"></div>
			<div class="placeholder"></div>
			<div class="placeholder"></div>
			<div class="placeholder"></div>
			<div class="placeholder"></div>
			<div class="placeholder"></div>
		</div>
		<script type="text/javascript" src="__JS__/cart/cart.js"></script>

		<script type="text/javascript" src="__JS__/jweixin-1.0.0.js"></script>

	</body>

</html>